// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FA_REPAIR
// * CreateDate    : 2012/3/12 17:00:34
// * Creater       : CodeSmith
// * LastChangeDate: 2012/3/12 17:00:34
// * LastChanger   : 2012/3/12 17:00:34
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FaRepairEntity : EntityBase
    {
        public FaRepairTable TableSchema
        {
            get
            {
                return FaRepairTable.Current;
            }
		}
		
		public FaRepairEntity()
        {

        }
		
		public FaRepairEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AssetId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_ID"]));
			this.Reason = Convert.ToString(CommonFunctions.ToObject(dr["REASON"]));
			this.LastRepairDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_REPAIR_DATE"]));
			this.LastRepairCompany = Convert.ToString(CommonFunctions.ToObject(dr["LAST_REPAIR_COMPANY"]));
			this.LastRepairPerson = Convert.ToString(CommonFunctions.ToObject(dr["LAST_REPAIR_PERSON"]));
			this.Result = Convert.ToString(CommonFunctions.ToObject(dr["RESULT"]));
			this.RepairFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPAIR_FEE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public FaRepairEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AssetId = Convert.ToString(CommonFunctions.ToObject(dr["ASSET_ID"]));
			this.Reason = Convert.ToString(CommonFunctions.ToObject(dr["REASON"]));
			this.LastRepairDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_REPAIR_DATE"]));
			this.LastRepairCompany = Convert.ToString(CommonFunctions.ToObject(dr["LAST_REPAIR_COMPANY"]));
			this.LastRepairPerson = Convert.ToString(CommonFunctions.ToObject(dr["LAST_REPAIR_PERSON"]));
			this.Result = Convert.ToString(CommonFunctions.ToObject(dr["RESULT"]));
			this.RepairFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPAIR_FEE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FaRepairTable.Current;
            }
        }
		
		#region Perporty List
        public string AssetId
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_ASSET_ID)); }
            set { SetData(FaRepairTable.C_ASSET_ID, value); }
        }
		
        public string Reason
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_REASON)); }
            set { SetData(FaRepairTable.C_REASON, value); }
        }
		
        public DateTime LastRepairDate
        {
            get { return Convert.ToDateTime(GetData(FaRepairTable.C_LAST_REPAIR_DATE)); }
            set { SetData(FaRepairTable.C_LAST_REPAIR_DATE, value); }
        }
		
        public string LastRepairCompany
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_LAST_REPAIR_COMPANY)); }
            set { SetData(FaRepairTable.C_LAST_REPAIR_COMPANY, value); }
        }
		
        public string LastRepairPerson
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_LAST_REPAIR_PERSON)); }
            set { SetData(FaRepairTable.C_LAST_REPAIR_PERSON, value); }
        }
		
        public string Result
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_RESULT)); }
            set { SetData(FaRepairTable.C_RESULT, value); }
        }
		
        public decimal RepairFee
        {
            get { return Convert.ToDecimal(GetData(FaRepairTable.C_REPAIR_FEE)); }
            set { SetData(FaRepairTable.C_REPAIR_FEE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(FaRepairTable.C_REMARK)); }
            set { SetData(FaRepairTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

